<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::Source::Git::GitProxy - bundler: Ruby Standard Library Documentation</title>


<script src="../../../js/navigation.js" defer></script>
<script src="../../../js/search.js" defer></script>
<script src="../../../js/search_index.js" defer></script>
<script src="../../../js/searcher.js" defer></script>
<script src="../../../js/darkfish.js" defer></script>

<script src="../../../js/jquery-3.2.0.min.js"></script>

<script src="../../../js/vue.min.js"></script>
<script src="../../../js/js.cookie.min.js"></script>

<link href="../../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../../css/rdoc.css" rel="stylesheet">
<link href="../../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../../";
  var index_rel_prefix = "../../../";
  var darkModeCsseHref = "../../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../../table_of_contents.html#pages">Pages</a>
    <a href="../../../table_of_contents.html#classes">Classes</a>
    <a href="../../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../../../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-allow-3F">#allow?</a>
    <li ><a href="#method-i-allowed_with_path">#allowed_with_path</a>
    <li ><a href="#method-i-capture">#capture</a>
    <li ><a href="#method-i-capture3_args_for">#capture3_args_for</a>
    <li ><a href="#method-i-check_allowed">#check_allowed</a>
    <li ><a href="#method-i-checkout">#checkout</a>
    <li ><a href="#method-i-clone_needs_extra_fetch-3F">#clone_needs_extra_fetch?</a>
    <li ><a href="#method-i-clone_needs_unshallow-3F">#clone_needs_unshallow?</a>
    <li ><a href="#method-i-commit">#commit</a>
    <li ><a href="#method-i-configured_uri">#configured_uri</a>
    <li ><a href="#method-i-contains-3F">#contains?</a>
    <li ><a href="#method-i-copy_to">#copy_to</a>
    <li ><a href="#method-i-credential_filtered_uri">#credential_filtered_uri</a>
    <li ><a href="#method-i-current_branch">#current_branch</a>
    <li ><a href="#method-i-depth">#depth</a>
    <li ><a href="#method-i-depth_args">#depth_args</a>
    <li ><a href="#method-i-extra_clone_args">#extra_clone_args</a>
    <li ><a href="#method-i-extra_fetch_args">#extra_fetch_args</a>
    <li ><a href="#method-i-extra_ref">#extra_ref</a>
    <li ><a href="#method-i-find_local_revision">#find_local_revision</a>
    <li ><a href="#method-i-find_revision_for">#find_revision_for</a>
    <li ><a href="#method-i-full_clone-3F">#full_clone?</a>
    <li ><a href="#method-i-full_version">#full_version</a>
    <li ><a href="#method-i-fully_qualified_ref">#fully_qualified_ref</a>
    <li ><a href="#method-i-git">#git</a>
    <li ><a href="#method-i-git_local">#git_local</a>
    <li ><a href="#method-i-git_null">#git_null</a>
    <li ><a href="#method-i-git_remote_fetch">#git_remote_fetch</a>
    <li ><a href="#method-i-git_retry">#git_retry</a>
    <li ><a href="#method-i-has_revision_cached-3F">#has_revision_cached?</a>
    <li ><a href="#method-i-head_revision">#head_revision</a>
    <li ><a href="#method-i-not_pinned-3F">#not_pinned?</a>
    <li ><a href="#method-i-pinned_to_full_sha-3F">#pinned_to_full_sha?</a>
    <li ><a href="#method-i-redact_and_check_presence">#redact_and_check_presence</a>
    <li ><a href="#method-i-refspec">#refspec</a>
    <li ><a href="#method-i-revision">#revision</a>
    <li ><a href="#method-i-run_command">#run_command</a>
    <li ><a href="#method-i-supports_cloning_with_no_tags-3F">#supports_cloning_with_no_tags?</a>
    <li ><a href="#method-i-supports_fetching_unreachable_refs-3F">#supports_fetching_unreachable_refs?</a>
    <li ><a href="#method-i-supports_minus_c-3F">#supports_minus_c?</a>
    <li ><a href="#method-i-verify">#verify</a>
    <li ><a href="#method-i-version">#version</a>
    <li ><a href="#method-i-with_path">#with_path</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::Source::Git::GitProxy">
    <h1 id="class-Bundler::Source::Git::GitProxy" class="class">
      class Bundler::Source::Git::GitProxy
    </h1>

    <section class="description">
    
<p>The <a href="GitProxy.html"><code>GitProxy</code></a> is responsible to interact with git repositories. All actions required by the <a href="../Git.html"><code>Git</code></a> source is encapsulated in this object.</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-branch" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">branch</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-explicit_ref" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">explicit_ref</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-path" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">path</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-ref" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">ref</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-revision" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">revision</span><span
                class="attribute-access-type">[W]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-tag" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">tag</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-uri" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">uri</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(path, uri, options = {}, revision = nil, git = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 53</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">revision</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">git</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-ivar">@path</span>     = <span class="ruby-identifier">path</span>
  <span class="ruby-ivar">@uri</span>      = <span class="ruby-identifier">uri</span>
  <span class="ruby-ivar">@branch</span>   = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;branch&quot;</span>]
  <span class="ruby-ivar">@tag</span>      = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;tag&quot;</span>]
  <span class="ruby-ivar">@ref</span>      = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;ref&quot;</span>]
  <span class="ruby-ivar">@explicit_ref</span> = <span class="ruby-identifier">branch</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tag</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">ref</span>
  <span class="ruby-ivar">@revision</span> = <span class="ruby-identifier">revision</span>
  <span class="ruby-ivar">@git</span>      = <span class="ruby-identifier">git</span>
  <span class="ruby-ivar">@commit_ref</span> = <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-checkout" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">checkout</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="checkout-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 90</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">checkout</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">has_revision_cached?</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Fetching #{credential_filtered_uri}&quot;</span>

  <span class="ruby-identifier">extra_fetch_needed</span> = <span class="ruby-identifier">clone_needs_extra_fetch?</span>
  <span class="ruby-identifier">unshallow_needed</span> = <span class="ruby-identifier">clone_needs_unshallow?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">extra_fetch_needed</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">unshallow_needed</span>

  <span class="ruby-identifier">git_remote_fetch</span>(<span class="ruby-identifier">unshallow_needed</span> <span class="ruby-operator">?</span> [<span class="ruby-string">&quot;--unshallow&quot;</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">depth_args</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-contains-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">contains?</span><span
                                class="method-args">(commit)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="contains-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 75</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">contains?</span>(<span class="ruby-identifier">commit</span>)
  <span class="ruby-identifier">allowed_with_path</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">result</span>, <span class="ruby-identifier">status</span> = <span class="ruby-identifier">git_null</span>(<span class="ruby-string">&quot;branch&quot;</span>, <span class="ruby-string">&quot;--contains&quot;</span>, <span class="ruby-identifier">commit</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">path</span>)
    <span class="ruby-identifier">status</span>.<span class="ruby-identifier">success?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/^\* (.*)$/</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-copy_to" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">copy_to</span><span
                                class="method-args">(destination, submodules = false)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="copy_to-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 102</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">copy_to</span>(<span class="ruby-identifier">destination</span>, <span class="ruby-identifier">submodules</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">destination</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;.git&quot;</span>))
    <span class="ruby-keyword">begin</span>
      <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">destination</span>.<span class="ruby-identifier">dirname</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
        <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">p</span>)
      <span class="ruby-keyword">end</span>
      <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">destination</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
        <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">p</span>)
      <span class="ruby-keyword">end</span>
      <span class="ruby-identifier">git</span> <span class="ruby-string">&quot;clone&quot;</span>, <span class="ruby-string">&quot;--no-checkout&quot;</span>, <span class="ruby-string">&quot;--quiet&quot;</span>, <span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">destination</span>.<span class="ruby-identifier">to_s</span>
      <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span>(((<span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">destination</span>).<span class="ruby-identifier">mode</span> <span class="ruby-operator">|</span> <span class="ruby-value">0o777</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-operator">~</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">umask</span>), <span class="ruby-identifier">destination</span>)
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EEXIST</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
      <span class="ruby-identifier">file_path</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>[<span class="ruby-regexp">%r{.*?((?:[a-zA-Z]:)?/.*)}</span>, <span class="ruby-value">1</span>]
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-string">&quot;Bundler could not install a gem because it needs to &quot;</span> \
        <span class="ruby-node">&quot;create a directory, but a file exists - #{file_path}. Please delete &quot;</span> \
        <span class="ruby-string">&quot;this file and try again.&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">git</span> <span class="ruby-string">&quot;fetch&quot;</span>, <span class="ruby-string">&quot;--force&quot;</span>, <span class="ruby-string">&quot;--quiet&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra_fetch_args</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">destination</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@commit_ref</span>

  <span class="ruby-identifier">git</span> <span class="ruby-string">&quot;reset&quot;</span>, <span class="ruby-string">&quot;--hard&quot;</span>, <span class="ruby-ivar">@revision</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">destination</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">submodules</span>
    <span class="ruby-identifier">git_retry</span> <span class="ruby-string">&quot;submodule&quot;</span>, <span class="ruby-string">&quot;update&quot;</span>, <span class="ruby-string">&quot;--init&quot;</span>, <span class="ruby-string">&quot;--recursive&quot;</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">destination</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">version</span>) <span class="ruby-operator">&gt;=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">create</span>(<span class="ruby-string">&quot;2.9.0&quot;</span>)
    <span class="ruby-identifier">inner_command</span> = <span class="ruby-string">&quot;git -C $toplevel submodule deinit --force $sm_path&quot;</span>
    <span class="ruby-identifier">git_retry</span> <span class="ruby-string">&quot;submodule&quot;</span>, <span class="ruby-string">&quot;foreach&quot;</span>, <span class="ruby-string">&quot;--quiet&quot;</span>, <span class="ruby-identifier">inner_command</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">destination</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-current_branch" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">current_branch</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="current_branch-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 69</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">current_branch</span>
  <span class="ruby-ivar">@current_branch</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">with_path</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">git_local</span>(<span class="ruby-string">&quot;rev-parse&quot;</span>, <span class="ruby-string">&quot;--abbrev-ref&quot;</span>, <span class="ruby-string">&quot;HEAD&quot;</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">path</span>).<span class="ruby-identifier">strip</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-full_version" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">full_version</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="full_version-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 86</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_version</span>
  <span class="ruby-ivar">@full_version</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">git_local</span>(<span class="ruby-string">&quot;--version&quot;</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/git version\s*/</span>, <span class="ruby-string">&quot;&quot;</span>).<span class="ruby-identifier">strip</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-revision" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">revision</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="revision-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">revision</span>
  <span class="ruby-ivar">@revision</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">allowed_with_path</span> { <span class="ruby-identifier">find_local_revision</span> }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-version" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">version</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="version-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 82</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">version</span>
  <span class="ruby-ivar">@version</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">full_version</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/((\.?\d+)+).*/</span>)[<span class="ruby-value">1</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-allow-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">allow?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="allow-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 314</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">allow?</span>
  <span class="ruby-identifier">allowed</span> = <span class="ruby-ivar">@git</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@git</span>.<span class="ruby-identifier">allow_git_ops?</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>

  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitNotInstalledError</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">allowed</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">git_present?</span>

  <span class="ruby-identifier">allowed</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-allowed_with_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">allowed_with_path</span><span
                                class="method-args">() { || ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="allowed_with_path-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 327</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">allowed_with_path</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">with_path</span> { <span class="ruby-keyword">yield</span> } <span class="ruby-keyword">if</span> <span class="ruby-identifier">allow?</span>
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">&quot;The git source #{uri} is not yet checked out. Please run `bundle install` before trying to start your application&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-capture" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">capture</span><span
                                class="method-args">(cmd, dir, ignore_err: false)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="capture-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 357</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">capture</span>(<span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-value">ignore_err:</span> <span class="ruby-keyword">false</span>)
  <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">with_clean_git_env</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">require</span> <span class="ruby-string">&quot;open3&quot;</span>
    <span class="ruby-identifier">out</span>, <span class="ruby-identifier">err</span>, <span class="ruby-identifier">status</span> = <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">capture3</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">capture3_args_for</span>(<span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">dir</span>))

    <span class="ruby-identifier">filtered_out</span> = <span class="ruby-constant">URICredentialsFilter</span>.<span class="ruby-identifier">credential_filtered_string</span>(<span class="ruby-identifier">out</span>, <span class="ruby-identifier">uri</span>)
    <span class="ruby-keyword">return</span> [<span class="ruby-identifier">filtered_out</span>, <span class="ruby-identifier">status</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">ignore_err</span>

    <span class="ruby-identifier">filtered_err</span> = <span class="ruby-constant">URICredentialsFilter</span>.<span class="ruby-identifier">credential_filtered_string</span>(<span class="ruby-identifier">err</span>, <span class="ruby-identifier">uri</span>)
    [<span class="ruby-identifier">filtered_out</span>, <span class="ruby-identifier">filtered_err</span>, <span class="ruby-identifier">status</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-capture3_args_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">capture3_args_for</span><span
                                class="method-args">(cmd, dir)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="capture3_args_for-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 370</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">capture3_args_for</span>(<span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">dir</span>)
  <span class="ruby-keyword">return</span> [<span class="ruby-string">&quot;git&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">dir</span>

  <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">feature_flag</span>.<span class="ruby-identifier">bundler_3_mode?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">supports_minus_c?</span>
    [<span class="ruby-string">&quot;git&quot;</span>, <span class="ruby-string">&quot;-C&quot;</span>, <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>]
  <span class="ruby-keyword">else</span>
    [<span class="ruby-string">&quot;git&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, { <span class="ruby-value">:chdir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">to_s</span> }]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-check_allowed" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_allowed</span><span
                                class="method-args">(command)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="check_allowed-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 332</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_allowed</span>(<span class="ruby-identifier">command</span>)
  <span class="ruby-identifier">command_with_no_credentials</span> = <span class="ruby-identifier">redact_and_check_presence</span>(<span class="ruby-identifier">command</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitNotAllowedError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_with_no_credentials</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">allow?</span>
  <span class="ruby-identifier">command_with_no_credentials</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-clone_needs_extra_fetch-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">clone_needs_extra_fetch?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="clone_needs_extra_fetch-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 151</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">clone_needs_extra_fetch?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">exist?</span>

  <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">filesystem_access</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">dirname</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">p</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">command</span> = [<span class="ruby-string">&quot;clone&quot;</span>, <span class="ruby-string">&quot;--bare&quot;</span>, <span class="ruby-string">&quot;--no-hardlinks&quot;</span>, <span class="ruby-string">&quot;--quiet&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra_clone_args</span>, <span class="ruby-string">&quot;--&quot;</span>, <span class="ruby-identifier">configured_uri</span>, <span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>]
  <span class="ruby-identifier">command_with_no_credentials</span> = <span class="ruby-identifier">check_allowed</span>(<span class="ruby-identifier">command</span>)

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Retry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;`#{command_with_no_credentials}`&quot;</span>, [<span class="ruby-constant">MissingGitRevisionError</span>]).<span class="ruby-identifier">attempts</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">_</span>, <span class="ruby-identifier">err</span>, <span class="ruby-identifier">status</span> = <span class="ruby-identifier">capture</span>(<span class="ruby-identifier">command</span>, <span class="ruby-keyword">nil</span>)
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">extra_ref</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">success?</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">err</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;Could not find remote branch&quot;</span>)
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingGitRevisionError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_with_no_credentials</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">explicit_ref</span>, <span class="ruby-identifier">credential_filtered_uri</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitCommandError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_with_no_credentials</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">err</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-clone_needs_unshallow-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">clone_needs_unshallow?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="clone_needs_unshallow-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 173</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">clone_needs_unshallow?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;shallow&quot;</span>).<span class="ruby-identifier">exist?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">full_clone?</span>

  <span class="ruby-ivar">@revision</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@revision</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">head_revision</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-commit" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">commit</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="commit-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 219</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">commit</span>
  <span class="ruby-ivar">@commit</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">pinned_to_full_sha?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">ref</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@revision</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-configured_uri" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">configured_uri</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds credentials to the <a href="../../URI.html"><code>URI</code></a></p>

                              <div class="method-source-code" id="configured_uri-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 296</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">configured_uri</span>
  <span class="ruby-keyword">if</span> <span class="ruby-regexp">/https?:/</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-identifier">uri</span>)
    <span class="ruby-identifier">remote</span> = <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">URI</span>(<span class="ruby-identifier">uri</span>)
    <span class="ruby-identifier">config_auth</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-identifier">remote</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-identifier">remote</span>.<span class="ruby-identifier">host</span>]
    <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">userinfo</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">config_auth</span>
    <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">uri</span>)
    <span class="ruby-node">&quot;file://#{uri}&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-credential_filtered_uri" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">credential_filtered_uri</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Removes credentials from the <a href="../../URI.html"><code>URI</code></a></p>

                              <div class="method-source-code" id="credential_filtered_uri-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 310</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">credential_filtered_uri</span>
  <span class="ruby-constant">URICredentialsFilter</span>.<span class="ruby-identifier">credential_filtered_uri</span>(<span class="ruby-identifier">uri</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-depth" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">depth</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="depth-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 187</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">depth</span>
  <span class="ruby-keyword">return</span> <span class="ruby-ivar">@depth</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-ivar">@depth</span>)

  <span class="ruby-ivar">@depth</span> = <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">supports_fetching_unreachable_refs?</span>
    <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">not_pinned?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">pinned_to_full_sha?</span>
    <span class="ruby-value">1</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;~&quot;</span>)
    <span class="ruby-identifier">parsed_depth</span> = <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;~&quot;</span>).<span class="ruby-identifier">last</span>
    <span class="ruby-identifier">parsed_depth</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-depth_args" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">depth_args</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="depth_args-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 396</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">depth_args</span>
  <span class="ruby-keyword">return</span> [] <span class="ruby-keyword">if</span> <span class="ruby-identifier">full_clone?</span>

  [<span class="ruby-string">&quot;--depth&quot;</span>, <span class="ruby-identifier">depth</span>.<span class="ruby-identifier">to_s</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-extra_clone_args" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">extra_clone_args</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="extra_clone_args-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 380</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">extra_clone_args</span>
  <span class="ruby-identifier">args</span> = <span class="ruby-identifier">depth_args</span>
  <span class="ruby-keyword">return</span> [] <span class="ruby-keyword">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-identifier">args</span> <span class="ruby-operator">+=</span> [<span class="ruby-string">&quot;--single-branch&quot;</span>]
  <span class="ruby-identifier">args</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-string">&quot;--no-tags&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">supports_cloning_with_no_tags?</span>

  <span class="ruby-comment"># If there&#39;s a locked revision, no need to clone any specific branch</span>
  <span class="ruby-comment"># or tag, since we will end up checking out that locked revision</span>
  <span class="ruby-comment"># anyways.</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">args</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@revision</span>

  <span class="ruby-identifier">args</span> <span class="ruby-operator">+=</span> [<span class="ruby-string">&quot;--branch&quot;</span>, <span class="ruby-identifier">branch</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tag</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">branch</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tag</span>
  <span class="ruby-identifier">args</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-extra_fetch_args" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">extra_fetch_args</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="extra_fetch_args-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 402</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">extra_fetch_args</span>
  <span class="ruby-identifier">extra_args</span> = [<span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">depth_args</span>]
  <span class="ruby-identifier">extra_args</span>.<span class="ruby-identifier">push</span>(<span class="ruby-ivar">@commit_ref</span>)
  <span class="ruby-identifier">extra_args</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-extra_ref" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">extra_ref</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="extra_ref-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 180</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">extra_ref</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">not_pinned?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">full_clone?</span>

  <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">&quot;refs/&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-find_local_revision" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">find_local_revision</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="find_local_revision-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 275</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_local_revision</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">head_revision</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">explicit_ref</span>.<span class="ruby-identifier">nil?</span>

  <span class="ruby-identifier">find_revision_for</span>(<span class="ruby-identifier">explicit_ref</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-find_revision_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">find_revision_for</span><span
                                class="method-args">(reference)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="find_revision_for-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 285</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_revision_for</span>(<span class="ruby-identifier">reference</span>)
  <span class="ruby-identifier">verify</span>(<span class="ruby-identifier">reference</span>)
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">GitCommandError</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingGitRevisionError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">command</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">reference</span>, <span class="ruby-identifier">credential_filtered_uri</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-full_clone-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">full_clone?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="full_clone-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 408</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_clone?</span>
  <span class="ruby-identifier">depth</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-fully_qualified_ref" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">fully_qualified_ref</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="fully_qualified_ref-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 223</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fully_qualified_ref</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">branch</span>
    <span class="ruby-node">&quot;refs/heads/#{branch}&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">tag</span>
    <span class="ruby-node">&quot;refs/tags/#{tag}&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-node">&quot;refs/heads/#{current_branch}&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git</span><span
                                class="method-args">(*command, dir: nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 255</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">dir:</span> <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">run_command</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">dir</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">unredacted_command</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">check_allowed</span>(<span class="ruby-identifier">unredacted_command</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git_local" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_local</span><span
                                class="method-args">(*command, dir: nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_local-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 261</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git_local</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">dir:</span> <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">run_command</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">dir</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">unredacted_command</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">redact_and_check_presence</span>(<span class="ruby-identifier">unredacted_command</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git_null" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_null</span><span
                                class="method-args">(*command, dir: nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_null-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 241</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git_null</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">dir:</span> <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">check_allowed</span>(<span class="ruby-identifier">command</span>)

  <span class="ruby-identifier">capture</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">dir</span>, <span class="ruby-value">:ignore_err</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git_remote_fetch" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_remote_fetch</span><span
                                class="method-args">(args)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_remote_fetch-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 135</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git_remote_fetch</span>(<span class="ruby-identifier">args</span>)
  <span class="ruby-identifier">command</span> = [<span class="ruby-string">&quot;fetch&quot;</span>, <span class="ruby-string">&quot;--force&quot;</span>, <span class="ruby-string">&quot;--quiet&quot;</span>, <span class="ruby-string">&quot;--no-tags&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-string">&quot;--&quot;</span>, <span class="ruby-identifier">configured_uri</span>, <span class="ruby-identifier">refspec</span>].<span class="ruby-identifier">compact</span>
  <span class="ruby-identifier">command_with_no_credentials</span> = <span class="ruby-identifier">check_allowed</span>(<span class="ruby-identifier">command</span>)

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Retry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;`#{command_with_no_credentials}` at #{path}&quot;</span>, [<span class="ruby-constant">MissingGitRevisionError</span>]).<span class="ruby-identifier">attempts</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">out</span>, <span class="ruby-identifier">err</span>, <span class="ruby-identifier">status</span> = <span class="ruby-identifier">capture</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">path</span>)
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">out</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">success?</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">err</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;couldn&#39;t find remote ref&quot;</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">err</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;not our ref&quot;</span>)
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingGitRevisionError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_with_no_credentials</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">commit</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">explicit_ref</span>, <span class="ruby-identifier">credential_filtered_uri</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitCommandError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_with_no_credentials</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">err</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git_retry" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_retry</span><span
                                class="method-args">(*command, dir: nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_retry-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 247</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git_retry</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">dir:</span> <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">command_with_no_credentials</span> = <span class="ruby-identifier">check_allowed</span>(<span class="ruby-identifier">command</span>)

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Retry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;`#{command_with_no_credentials}` at #{dir || SharedHelpers.pwd}&quot;</span>).<span class="ruby-identifier">attempts</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">git</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">dir</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-has_revision_cached-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">has_revision_cached?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="has_revision_cached-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 267</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">has_revision_cached?</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@revision</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">exist?</span>
  <span class="ruby-identifier">git</span>(<span class="ruby-string">&quot;cat-file&quot;</span>, <span class="ruby-string">&quot;-e&quot;</span>, <span class="ruby-ivar">@revision</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">path</span>)
  <span class="ruby-keyword">true</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">GitError</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-head_revision" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">head_revision</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="head_revision-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 281</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">head_revision</span>
  <span class="ruby-identifier">verify</span>(<span class="ruby-string">&quot;HEAD&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-not_pinned-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">not_pinned?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="not_pinned-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 233</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">not_pinned?</span>
  <span class="ruby-identifier">branch</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tag</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-pinned_to_full_sha-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">pinned_to_full_sha?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="pinned_to_full_sha-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 237</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pinned_to_full_sha?</span>
  <span class="ruby-identifier">ref</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\A\h{40}\z/</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-redact_and_check_presence" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">redact_and_check_presence</span><span
                                class="method-args">(command)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="redact_and_check_presence-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 338</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">redact_and_check_presence</span>(<span class="ruby-identifier">command</span>)
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitNotInstalledError</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">git_present?</span>

  <span class="ruby-identifier">require</span> <span class="ruby-string">&quot;shellwords&quot;</span>
  <span class="ruby-constant">URICredentialsFilter</span>.<span class="ruby-identifier">credential_filtered_string</span>(<span class="ruby-node">&quot;git #{command.shelljoin}&quot;</span>, <span class="ruby-identifier">uri</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-refspec" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">refspec</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="refspec-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 200</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">refspec</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span>
    <span class="ruby-ivar">@commit_ref</span> = <span class="ruby-node">&quot;refs/#{commit}-sha&quot;</span>
    <span class="ruby-keyword">return</span> <span class="ruby-node">&quot;#{commit}:#{@commit_ref}&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">reference</span> = <span class="ruby-identifier">fully_qualified_ref</span>

  <span class="ruby-identifier">reference</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&quot;~&quot;</span>)
    <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;~&quot;</span>).<span class="ruby-identifier">first</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">&quot;refs/&quot;</span>)
    <span class="ruby-identifier">ref</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-string">&quot;refs/*&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-node">&quot;#{reference}:#{reference}&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-run_command" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">run_command</span><span
                                class="method-args">(*command, dir: nil) { |command| ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="run_command-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 345</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">run_command</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">command</span>, <span class="ruby-value">dir:</span> <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">command_with_no_credentials</span> = <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">command</span>)

  <span class="ruby-identifier">out</span>, <span class="ruby-identifier">err</span>, <span class="ruby-identifier">status</span> = <span class="ruby-identifier">capture</span>(<span class="ruby-identifier">command</span>, <span class="ruby-identifier">dir</span>)

  <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitCommandError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">command_with_no_credentials</span>, <span class="ruby-identifier">dir</span> <span class="ruby-operator">||</span> <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">pwd</span>, <span class="ruby-identifier">err</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">success?</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-identifier">err</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">err</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-identifier">out</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-supports_cloning_with_no_tags-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">supports_cloning_with_no_tags?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="supports_cloning_with_no_tags-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 420</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">supports_cloning_with_no_tags?</span>
  <span class="ruby-ivar">@supports_cloning_with_no_tags</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">version</span>) <span class="ruby-operator">&gt;=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;2.14.0-rc0&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-supports_fetching_unreachable_refs-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">supports_fetching_unreachable_refs?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="supports_fetching_unreachable_refs-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 416</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">supports_fetching_unreachable_refs?</span>
  <span class="ruby-ivar">@supports_fetching_unreachable_refs</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">version</span>) <span class="ruby-operator">&gt;=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;2.5.0&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-supports_minus_c-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">supports_minus_c?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="supports_minus_c-3F-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 412</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">supports_minus_c?</span>
  <span class="ruby-ivar">@supports_minus_c</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">version</span>) <span class="ruby-operator">&gt;=</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;1.8.5&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-verify" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">verify</span><span
                                class="method-args">(reference)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="verify-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 291</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">verify</span>(<span class="ruby-identifier">reference</span>)
  <span class="ruby-identifier">git</span>(<span class="ruby-string">&quot;rev-parse&quot;</span>, <span class="ruby-string">&quot;--verify&quot;</span>, <span class="ruby-identifier">reference</span>, <span class="ruby-value">:dir</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">path</span>).<span class="ruby-identifier">strip</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-with_path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">with_path</span><span
                                class="method-args">(&amp;blk)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="with_path-source">
            <pre><span class="ruby-comment"># File bundler/source/git/git_proxy.rb, line 322</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">with_path</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
  <span class="ruby-identifier">checkout</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">exist?</span>
  <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

